#ifndef WEAPON_H
#define WEAPON_H

#include "..\models\md2model.h"

class Weapon
{
	protected:
		Weapon(MD2Model *weaponModel);
		MD2Model *weaponModel;

		int ammo;
		char shootFrame[64];
		char swayFrame[64];
		char hideFrame[64];
		char pickFrame[64];

		double movingAnimationSpeed;
		double shootingAnimationSpeed;
		double hidingAnimationSpeed;
		double pickingAnimationSpeed;

		bool isShooting;
		bool isHiding;
		bool isPicking;

	public:
		~Weapon();
		int getAmmo();
		void shoot();
		void hideWeapon();
		void pickWeapon();
		void virtual draw();
		void advanceAnimation(bool isOnTheGround, bool moves);
		bool getFinishedAnimation();
		void setIsPicking(bool value);
		void setAnimation(char* name, char *frameToReturn = NULL, bool returnToPreviousFrame = false);
		bool getIsShooting();
		void resetActions();
};

#endif //WEAPON_H